<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>AdminLTE 3 | Dashboard 3</title>

  <!-- Google Font: Source Sans Pro -->
  <link rel="stylesheet"
    href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  <!-- Font Awesome Icons -->
  <link rel="stylesheet" href="plugins/fontawesome-free/css/all.min.css">
  <!-- IonIcons -->
  <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
  <!-- DataTables -->
  <link rel="stylesheet" href="plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
  <link rel="stylesheet" href="plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/adminlte.min.css">

  <link type="text/css" rel="stylesheet" charset="UTF-8"
    href="https://translate.googleapis.com/translate_static/css/translateelement.css">
  <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
  <script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
  <script src="exceljs/Blob.js"></script>

  <script src="exceljs/FileSaver.js"></script>

  <script src="exceljs/tableExport.js"></script>
</head>
<!--
`body` tag options:

  Apply one or more of the following classes to to the body tag
  to get the desired effect

  * sidebar-collapse
  * sidebar-mini
-->

<body class="hold-transition sidebar-mini">
  <div class="wrapper">


    <div id="all">
      <!-- 调拨管理 -->
      <div id="dbgl">
        <!-- Content Header (Page header) -->
        <div class="content-header">
          <div style="margin-left:1%;margin-right: 1%;">
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <a href="#" class="nav-link">
                    <i class="fas fa-paw nav-icon"></i>
                    <p>黄金品类</p>
                  </a>
                </li>
                <li class="nav-item d-none d-sm-inline-block">
                  <a href="#" class="nav-link" onclick="fun9()" @click="find_list()">
                    <i class="fas fa-plus nav-icon"></i>
                    <p>新增调拨单</p>
                  </a>
                </li>
                <li class="nav-item d-none d-sm-inline-block">
                  <a data-type="xls" href="javascript:;" id="export_db" class="nav-link">
                    <i class="fas  fa-random nav-icon"></i>
                    <p>导出</p>
                  </a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-4">

              </ul>

            </nav>
            <div class="card">
              <!-- /.card-header -->
              <div class="card-body">
                <div id="example1_wrapper" class="dataTables_wrapper dt-bootstrap4">
                  <div class="row">
                    <div class="col-sm-12">
                      <table id="example4" class="table table-bordered table-striped dataTable dtr-inline" role="grid"
                        aria-describedby="example1_info">
                        <thead class="text-center">
                          <tr role="row">
                            <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">操作
                            </th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Browser: activate to sort column ascending">单号</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">仓库</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Engine version: activate to sort column ascending">部门</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="CSS grade: activate to sort column ascending">产品名称</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">重量</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">数量</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">调拨时间</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">状态</th>
                          </tr>
                        </thead>
                        <tbody class="text-center">
                          <tr role="row" class="odd" style="display: none;">
                            <td class="" tabindex="0">Gecko</td>
                            <td style="">Epiphany 2.20</td>
                            <td style="">Gnome</td>
                            <td style="">Epiphany 2.20</td>
                            <td style="">Gnome</td>
                            <td style="">Epiphany 2.20</td>
                            <td style="">Gnome</td>
                            <td style="">Gnome</td>
                            <td style="">1.8</td>

                          </tr>

                          <tr v-for="(allocation,index) in allocations">
                            <td><a href="#" style="color: black;" @click="delete_db(allocation.aorder)"><i
                                  class="nav-icon fas  fa-trash"></i></a></td>
                            <td><a href="#" onclick="fun14()"
                                @click="detail_db(allocation.aorder,index)">{{allocation.aorder}}</a></td>
                            <td>{{allocation.sname}}</td>
                            <td>{{allocation.dname}}</td>
                            <td>{{allocation.pname}}</td>
                            <td>{{allocation.weight}}</td>
                            <td>{{allocation.num}}</td>
                            <td>{{allocation.atime}}</td>
                            <td>{{allocation.status}}</td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- /.content-header -->
      </div>
      <!-- 新增调拨 -->
      <div id="xzdb" style="display: none;">
        <!-- Content Header (Page header) -->
        <div class="content-header">
          <div style="margin-left:1%;margin-right: 1%;">
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <a class="nav-link">
                    <i class="fas fa-plus nav-icon"></i>
                    <p>新增调拨单</p>
                  </a>
                </li>

              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-5">

              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-2">
                <button class="btn btn-primary" @click="insert_db()"><i
                    class="fas  fa-edit nav-icon"></i>&nbsp;提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <button class="btn btn-primary" onclick="fun4()"><i class="fas  fa-reply nav-icon"></i>&nbsp;取消</button>
              </ul>

            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light" style="height: 1px;">
              <hr style="height: 0.1px; width: 100%;background-color: lightgray;">
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <a class="nav-link">
                    <i class="fas fa-signal nav-icon"></i>
                    <p>基本信息</p>
                  </a>
                </li>
              </ul>
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;单号:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <input type="text" style="height: 40px; width: 200px;" placeholder="DB****" v-model="aorder_db">
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;品类:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="cgname_db">
                    <option>单品</option>
                    <option>通品</option>

                  </select>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar  ">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;仓库:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="sname_db">
                    <option v-for="storehouse in storehouses">{{storehouse.shname}}</option>
                  </select>
                </li>
              </ul>
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar  ">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;部门:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="dname_db">
                    <option v-for="department in departments">{{department.dname}}</option>
                  </select>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar  ">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;成色:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="qname_db">
                    <option>千足金9999</option>
                    <option>千足金10000</option>
                  </select>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar  ">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;重量:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <input type="text" style="height: 40px; width: 200px;" v-model="weight_db" placeholder="请输入重量">
                </li>
              </ul>
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">

              <ul class="navbar-nav nav-sidebar  ">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数量:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <input type="text" style="height: 40px; width: 200px;" v-model="num_db" placeholder="请输入数量">
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;产品名称:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="pname_db">
                    <option v-for="cgname in cgnames">{{cgname.cgname}}</option>
                  </select>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;状态:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <select class="selectpicker show-tick form-control" style="width: 200px;" v-model="status_db">
                    <option>未开始</option>
                    <option>成功</option>
                    <option>失败</option>
                    <option>进行中</option>
                  </select>
                </li>
              </ul>
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">

              <ul class="navbar-nav nav-sidebar  " style="margin-left:1%;">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;调拨时间:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <input type="datetime-local" class="measureDate" style="height: 40px; width: 200px;"
                    v-model="atime_db">
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar  " style="margin-left:1%;">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>&nbsp;制单时间:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <input type="datetime-local" class="measureDate" style="height: 40px; width: 200px;"
                    v-model="mtime_db">
                </li>
              </ul>

              <ul class="navbar-nav nav-sidebar  ">
                <li class="nav-item d-none d-sm-inline-block">
                  <a>制单人:</a>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <li class="nav-item d-none d-sm-inline-block">
                  <input type="text" style="height: 40px; width: 200px;" v-model="mname_db" placeholder="请输入你的名字">
                </li>
              </ul>
            </nav>

            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <a class="nav-link">
                    <i class="fas fa-signal nav-icon"></i>
                    <p>产品信息</p>
                  </a>
                </li>
              </ul>
            </nav>
            <div class="card">
              <!-- /.card-header -->
              <div class="card-body">
                <div id="example1_wrapper" class="dataTables_wrapper dt-bootstrap4">
                  <div class="row">
                    <div class="col-sm-12">
                      <table id="example9" class="table table-bordered table-striped dataTable dtr-inline" role="grid"
                        aria-describedby="example1_info">
                        <thead class="text-center">
                          <tr role="row">
                            <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">操作
                            </th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Browser: activate to sort column ascending">单号</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">仓库</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Engine version: activate to sort column ascending">部门</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="CSS grade: activate to sort column ascending">产品名称</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">重量</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">数量</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">调拨时间</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">状态</th>
                          </tr>
                        </thead>
                        <tbody class="text-center">
                          <tr role="row" class="odd" style="display: none;">
                            <td class="" tabindex="0">Gecko</td>
                            <td style="">Epiphany 2.20</td>
                            <td style="">Gnome</td>
                            <td style="">Epiphany 2.20</td>
                            <td style="">Gnome</td>
                            <td style="">Epiphany 2.20</td>
                            <td style="">Gnome</td>
                            <td style="">Gnome</td>
                            <td style="">1.8</td>
                            <td style="">A</td>

                          </tr>

                          <tr v-for="(allocation,index) in allocations">
                            <td><a href="#" style="color: black;" @click="delete_db(allocation.aorder)"><i
                                  class="nav-icon fas  fa-trash"></i></a></td>
                            <td><a href="#" onclick="fun14()"
                                @click="detail_db(allocation.aorder,index)">{{allocation.aorder}}</a></td>
                            <td>{{allocation.sname}}</td>
                            <td>{{allocation.dname}}</td>
                            <td>{{allocation.pname}}</td>
                            <td>{{allocation.weight}}</td>
                            <td>{{allocation.num}}</td>
                            <td>{{allocation.atime}}</td>
                            <td>{{allocation.status}}</td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- /.content-header -->
      </div>
      <!-- 调拨详情 -->
      <div id="dbxq" style="display: none;">
        <!-- Content Header (Page header) -->
        <div class="content-header">
          <div style="margin-left:1%;margin-right: 1%;">
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <a class="nav-link">
                    <i class="fas fa-tasks nav-icon"></i>
                    <p>调拨单详情</p>
                  </a>
                </li>


              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-5">

              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-3">
                <div class="btn-group">
                  <button type="button" class="btn btn-default" @click="last_one_db()">上一条</button>
                  <button type="button" class="btn btn-default" @click="next_one_db()">下一条</button>

                </div>

              </ul>


            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light" style="height: 1px;">
              <hr style="height: 0.1px; width: 100%;background-color: lightgray;">
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <a class="nav-link">
                    <i class="fas fa-signal nav-icon"></i>
                    <p>基本信息</p>
                  </a>
                </li>
              </ul>
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4" style="margin-left: 2%;">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>
                    单号:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.aorder}}
                  </p>

                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>品类:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.cgname}}</p>

                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>
                    仓库:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.sname}}
                  </p>

                </li>
              </ul>
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4" style="margin-left: 2%;">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>产品名称:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.pname}}</p>

                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>部门:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.dname}}</p>

                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>
                    成色:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.qname}}
                  </p>

                </li>
              </ul>
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4" style="margin-left: 2%;">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>
                    重量:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.weight}}
                  </p>
                  <p></p>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>数量:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.num}}</p>
                  <p></p>
                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>
                    状态:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.status}}
                  </p>
                  <p></p>
                </li>
              </ul>
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4" style="margin-left: 2%;">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>调拨时间:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.atime}}</p>

                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>仓库人:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.mname}}</p>

                </li>
              </ul>
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <p>制单时间:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{details_db.mtime}}</p>

                </li>
              </ul>
            </nav>
            <nav class=" navbar navbar-expand navbar-white navbar-light">
              <ul class="navbar-nav nav-sidebar col-sm-4">
                <li class="nav-item d-none d-sm-inline-block">
                  <a class="nav-link">
                    <i class="fas fa-signal nav-icon"></i>
                    <p>调拨信息</p>
                  </a>
                </li>
              </ul>
            </nav>
            <div class="card">
              <!-- /.card-header -->
              <div class="card-body">
                <div id="example1_wrapper" class="dataTables_wrapper dt-bootstrap4">
                  <div class="row">
                    <div class="col-sm-12">
                      <table id="example15" class="table table-bordered table-striped dataTable dtr-inline" role="grid"
                        aria-describedby="example1_info">
                        <thead class="text-center">
                          <tr role="row">
                            <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">操作
                            </th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Browser: activate to sort column ascending">单号</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">仓库</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Engine version: activate to sort column ascending">部门</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="CSS grade: activate to sort column ascending">产品名称</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">重量</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">数量</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">调拨时间</th>
                            <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                              aria-label="Platform(s): activate to sort column ascending">状态</th>
                          </tr>
                        </thead>
                        <tbody class="text-center">
                          <tr role="row" class="odd" style="display: none;">
                            <td class="" tabindex="0">Gecko</td>
                            <td style="">Epiphany 2.20</td>
                            <td style="">Gnome</td>
                            <td style="">Epiphany 2.20</td>
                            <td style="">Gnome</td>
                            <td style="">Epiphany 2.20</td>
                            <td style="">Gnome</td>
                            <td style="">Gnome</td>
                            <td style="">1.8</td>
                            <td style="">A</td>

                          </tr>

                          <tr v-for="(allocation,index) in allocations">
                            <td><a href="#" style="color: black;" @click="delete_db(allocation.aorder)"><i
                                  class="nav-icon fas  fa-trash"></i></a></td>
                            <td><a href="#" onclick="fun14()"
                                @click="detail_db(allocation.aorder,index)">{{allocation.aorder}}</a></td>
                            <td>{{allocation.sname}}</td>
                            <td>{{allocation.dname}}</td>
                            <td>{{allocation.pname}}</td>
                            <td>{{allocation.weight}}</td>
                            <td>{{allocation.num}}</td>
                            <td>{{allocation.atime}}</td>
                            <td>{{allocation.status}}</td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- /.content-header -->
      </div>

    </div>



  </div>
  <!-- ./wrapper -->

  <!-- REQUIRED SCRIPTS -->

  <!-- jQuery -->
  <script src="plugins/jquery/jquery.min.js"></script>
  <!-- Bootstrap -->
  <script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
  <!-- AdminLTE -->
  <script src="dist/js/adminlte.js"></script>

  <!-- OPTIONAL SCRIPTS -->
  <script src="plugins/chart.js/Chart.min.js"></script>
  <!-- AdminLTE for demo purposes -->
  <script src="dist/js/demo.js"></script>
  <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
  <script src="dist/js/pages/dashboard3.js"></script>
  <!-- DataTables -->
  <script src="plugins/datatables/jquery.dataTables.min.js"></script>
  <script src="plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
  <script src="plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
  <script src="plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
  <!-- <script src="dist/js/adminlte.min.js"></script> -->
  <!-- page script -->
  <script>
    $(function () {
      $("#example1").DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example2').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example3').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example4').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example5').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example6').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example7').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example8').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example9').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example10').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example11').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example12').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example13').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example14').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example15').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example16').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example17').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
      $('#example18').DataTable({
        "responsive": true,
        "autoWidth": false,
      });
    });
  </script>
  <script>

    //显示调拨管理
    function fun4() {
      document.getElementById("dbgl").style.display = "";
      document.getElementById("dbxq").style.display = "none";
      alldisplay();
    }


    //显示新增调拨
    function fun9() {
      document.getElementById("dbgl").style.display = "none";
      document.getElementById("xzdb").style.display = "";
    }


    //显示调拨详情
    function fun14() {
      alldisplay();
      document.getElementById("dbxq").style.display = "";
      document.getElementById("dbgl").style.display = "none";
    }


    //隐藏所有新增*
    function alldisplay() {
      document.getElementById("xzdb").style.display = "none";
    }
  </script>
  <script>
    var ttindex = 0;
    new Vue({
      el: "#all",

      data: {
        allocations: [],
        details_db: [],
        areas: [],
        cnames: [],
        cgnames: [],
        storehouses: [],
        departments: [],
        warehousing: [],
        //调拨信息获取
        aorder_db: "",
        cgname_db: "",
        sname_db: "",
        dname_db: "",
        qname_db: "",
        weight_db: "",
        num_db: "",
        status_db: "",
        pname_db: "",
        atime_db: "",
        mname_db: "",
        mtime_db: "",
      },
      //当页面记载完毕时 
      mounted() {
        axios.get('allocation/find')
          .then(res => {
            console.info(res.data);
            this.allocations = res.data;
          })

      },
      methods: {
        detail_db: function (allocation, index) {
          ttindex = index;
          this.allocation = this.allocations[index];
          axios.get('allocation/detail', {
            params: {
              aorder: allocation
            }
          })
            .then(res => {

              console.info(res.data);
              this.details_db = res.data[0];

            })
        },
        find_list: function () {
          axios.get('area/findArea')
            .then(res => {
              console.info(res.data);
              this.areas = res.data;
            }),
            axios.get('client/findcname')
              .then(res => {
                console.info(res.data);
                this.cnames = res.data;
              }),
            axios.get('category/findcgname')
              .then(res => {
                console.info(res.data);
                this.cgnames = res.data;
              }),
            axios.get('storehouse/find')
              .then(res => {
                console.info(res.data);
                this.storehouses = res.data;
              }),
            axios.get('department/find')
              .then(res => {
                console.info(res.data);
                this.departments = res.data;
              })
        },
        insert_db: function () {
          axios.get('allocation/insert', {
            params: {
              aorder: this.aorder_db,
              cgname: this.cgname_db,
              sname: this.sname_db,
              dname: this.dname_db,
              qname: this.qname_db,
              weight: this.weight_db,
              num: this.num_db,
              status: this.status_db,
              pname: this.pname_db,
              atime: this.atime_db,
              mname: this.mname_db,
              mtime: this.mtime_db
            }
          })
            .then(res => {
              console.info(res.data);
              if (res.data == "success") {
                alert("提交成功");
              } else {
                alert("提交失败")
              }

            })
        },
        last_one_db: function () {
          //alert(ttindex);
          ttindex = ttindex - 1;
          if (ttindex >= 0) {
            this.details_db = this.allocations[ttindex];
          } else {
            alert("这是第一条了");
          }
          //console.info(this.detailss);
        },
        next_one_db: function () {
          ttindex = ttindex + 1;
          if (ttindex <= this.allocations.length - 1) {
            this.details_db = this.allocations[ttindex];
          } else {
            alert("最后第一条了");
          }

          //console.info(this.detailss);
        },
        delete_db: function (delete_db) {
          axios.get('allocation/delete', {
            params: {
              aorder: delete_db
            }
          })
            .then(res => {
              console.info(res.data);
              if (res.data == "success") {
                alert("删除成功");
                var allocations = this.allocations;
                for (var i = 0; i < allocations.length; i++) {
                  var b = allocations[i];
                  if (b.aorder == delete_db) {
                    allocations.splice(i, 1);
                    //重新赋值
                    this.allocations = allocations;
                    break;
                  }
                }
              } else {
                alert("删除失败")
              }

            })
        }


      }

    });

  </script>
  <script>
    var $exportLink = document.getElementById('export_db');
    $exportLink.addEventListener('click', function (e) {
      e.preventDefault();
      if (e.target.nodeName === "A") {
        tableExport('example4', '调拨管理', e.target.getAttribute('data-type'));
      }
    }, false);
  </script>
</body>

</html>